package com.x.erp.model;

import com.x.framework.annotation.MappingColumn;
import com.x.framework.annotation.MappingTable;
import com.x.framework.model.BaseObject;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 延保商品使用券
 */
@MappingTable(tableName = "ERP_INSURANCE_GOODS_VOUCHER")
public class InsuranceGoodsVoucher extends BaseObject {

	private static final long serialVersionUID = 422362771447358347L;

	@MappingColumn(columnName = "VOUCHER_ID", columnPk = true, columnLength = 32)
	private String voucherId;// 延保商品使用券Id

	@MappingColumn(columnName = "VOUCHER_NAME")
	private String voucherName;// 使用券名称

	@MappingColumn(columnName = "ORDER_ID")
	private String orderId;// 延保订单Id

	@MappingTable(tableName = "INSURANCE_ORDER")
	private InsuranceOrder insuranceOrder;// 延保订单信息

	@MappingColumn(columnName = "ORDER_GOODS_ID")
	private String orderGoodsId;// 延保订单商品Id

	@MappingTable(tableName = "INSURANCE_ORDER_GOODS")
	private InsuranceOrderGoods insuranceOrderGoods;// 延保订单商品信息

	@MappingColumn(columnName = "VOUCHER_INSURANCE_NO")
	private String voucherInsuranceNo;// 延保编号（核销时使用）

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@MappingColumn(columnName = "VOUCHER_VERIFICATION_TIME")
	private Date voucherVerificationTime;// 核销时间


	@MappingColumn(columnName = "VOUCHER_VERIFICATION_STATE")
	private Integer voucherVerificationState;// 核销状态（0未核销 1已核销）

	public String getVoucherId() {
		return voucherId;
	}

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@MappingColumn(columnName = "VOUCHER_CREATE_TIME")
	private Date voucherCreateTime;// 创建时间

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@MappingColumn(columnName = "VOUCHER_UPDATE_TIME")
	private Date voucherUpdateTime;// 修改时间

	public void setVoucherId(String voucherId) {
		this.voucherId = voucherId;
	}

	public String getVoucherName() {
		return voucherName;
	}

	public void setVoucherName(String voucherName) {
		this.voucherName = voucherName;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public InsuranceOrder getInsuranceOrder() {
		return insuranceOrder;
	}

	public void setInsuranceOrder(InsuranceOrder insuranceOrder) {
		this.insuranceOrder = insuranceOrder;
	}

	public String getOrderGoodsId() {
		return orderGoodsId;
	}

	public void setOrderGoodsId(String orderGoodsId) {
		this.orderGoodsId = orderGoodsId;
	}

	public InsuranceOrderGoods getInsuranceOrderGoods() {
		return insuranceOrderGoods;
	}

	public void setInsuranceOrderGoods(InsuranceOrderGoods insuranceOrderGoods) {
		this.insuranceOrderGoods = insuranceOrderGoods;
	}

	public String getVoucherInsuranceNo() {
		return voucherInsuranceNo;
	}

	public void setVoucherInsuranceNo(String voucherInsuranceNo) {
		this.voucherInsuranceNo = voucherInsuranceNo;
	}

	public Date getVoucherVerificationTime() {
		return voucherVerificationTime;
	}

	public void setVoucherVerificationTime(Date voucherVerificationTime) {
		this.voucherVerificationTime = voucherVerificationTime;
	}

	public Integer getVoucherVerificationState() {
		return voucherVerificationState;
	}

	public void setVoucherVerificationState(Integer voucherVerificationState) {
		this.voucherVerificationState = voucherVerificationState;
	}

	public Date getVoucherCreateTime() {
		return voucherCreateTime;
	}

	public void setVoucherCreateTime(Date voucherCreateTime) {
		this.voucherCreateTime = voucherCreateTime;
	}

	public Date getVoucherUpdateTime() {
		return voucherUpdateTime;
	}

	public void setVoucherUpdateTime(Date voucherUpdateTime) {
		this.voucherUpdateTime = voucherUpdateTime;
	}
}
